<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<title>${systemName}</title>
    <%@ include file="/WEB-INF/views/jsp/includes/headerjs.jsp" %>
    <style>
    .error{color:red;}
    .login-layout .widget-box .widget-main{
      padding: 20px 20px 5px 20px
    }
    </style>
    <script type="text/javascript">
    <!--  
    if (top.location != location)  
    {  
    	top.location.href = location.href;  
    }  
    //-->  
     if (self != top) {    
    	 top.location.href=self.location.href;
  	 }  
    </script>
</head>
<body class="login-layout light-login login-page">
<center>
<div class="main-container" style="margin-top: 5%;margin-bottom: 5%">
  <div class="main-content">
    <div class="row">
      <div class="col-sm-10 col-sm-offset-1">
          <div class="center">
            <h1 id="id-text2" class="grey">
              <i class="ace-icon fa "></i>
                         ${systemName}
            </h1>
          </div>
          <div class="space-6"></div>
          <br>
        <div class="login-container">
          <div class="position-relative">
	            <div id="login-box" class="login-box visible widget-box no-border">
	              <div class="widget-body">
	                  <div class="widget-main">
		                  <div id="showErrMsg" val="${error}" class="alert alert-danger alert-dismissible" role="alert" id="errMsgContiner">
						  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						  <div>${error}</div>
					  </div>
			           <div class="widget-main">
						 <form id='beanForm' class="form-horizontal"  action="${ctx}/auth/login?${_para}" method="post" onsubmit="return validate_login_form(this)">
			                  <h4 class="header blue lighter bigger">
			                    <i class="ace-icon fa "></i>
			                	    用户登录
			                  </h4>
			                  <div class="space-6"></div>
			                  <div class="input-group input-group-sx">
										<span class="input-group-addon">
											<i class="fa fa-user" style="width:15px;"></i>
										</span>
										<input type="text" name="username" value="${default_login_username}" class="form-control" placeholder="用户名/邮箱">
								</div>
								<br>
								<div class="input-group input-group-sx">
										<span class="input-group-addon">
											<i class="fa fa-unlock-alt" style="width:15px;"></i>
										</span>
										<input type="password" name="password" value="${default_login_password}"  class="form-control" placeholder="密码">
								</div>
								<c:if test="${sessionScope.ShowCAPTCHA=='true'}">
								<br>
								<div class="input-group input-group-sx">
										<span class="input-group-addon">
											<i class="fa fa-picture-o" style="width:15px;"></i>
										</span>
										<span class="block input-icon input-icon-right" style="">
											<input type="text" style="height: 32.6px" name="captcha" value="${default_login_captcha}" class="form-control width-60 pull-left" placeholder="验证码">
											<img title="点击更换验证码" class="pull-right" id="randCodeImage"  src="${ctx}/auth/jcaptcha.jpg?w=99&h=31&${_para}" onclick="this.src = '${ctx}/auth/jcaptcha.jpg?w=99&h=31&v=' + Math.random()+'&${_para}'" style="border-left: 0;cursor: pointer;border: 1px solid rgb(181, 181, 181)" />
										</span>
								</div>  
								</c:if>
								<div class="input-group input-group-sx" style=" ">
								<c:if test="${sessionScope.enableRememberMe}">
										<span class="inline" style="margin-top: 10px;margin-left: 0px;padding-left: 0px">
											<input type="checkbox" class="ace" name="rememberMe" />
											<span class="lbl">记住我</span>
										</span>
								</c:if>
								<c:if test="${sessionScope.enableAutoLogin}">
										<span class="inline" style="margin-top: 10px;margin-left: 0px;padding-left: 0px">
											<input type="checkbox" class="ace" name="autoLogin" />
											<span class="lbl">下次自动登录</span>
										</span>
								</c:if>
								</div>
								
			                      <div class="space"></div>
			                      <div class="clearfix">
										<button type="reset" class="width-30 pull-left btn btn-sm btn-info">
											<i class="ace-icon fa fa-refresh"></i>
											<span class="bigger-110">重置</span>
										</button>
	
										<button type="submit" id="but_login" class="width-35 pull-right btn btn-sm btn-primary">
											<span class="bigger-110">登录</span>
	
											<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
										</button>
									</div>
			                      <div class="space-4"></div>
			                     </div>
			                  </form>
			                </div>
			                
			                <div class="toolbar clearfix">
				               <c:if test="${applicationScope['sys_password_back_open']}">
									<div>
										<a href="#" data-target="#forgot-box" class="forgot-password-link">
											<!-- --> <i class="ace-icon fa fa-arrow-left"></i>
											忘记密码
										</a>
									</div>
				               </c:if>
								<c:if test="${applicationScope['sys_register_open']}">
								<div>
									<a href="#" data-target="#signup-box" class="user-signup-link">
										<!-- 注册 -->
										<i class="ace-icon fa fa-arrow-right"></i>注册
									</a>
								</div>
				               </c:if>
							</div>
	              </div>
	            </div><!-- /.login-box -->
	            <c:if test="${applicationScope['sys_password_back_open']}">
				<div id="forgot-box" class="forgot-box widget-box no-border">
					<div class="widget-body">
						<div class="widget-main">
							<h4 class="header red lighter bigger">
								<i class="ace-icon fa fa-key"></i>
								找回密码
							</h4>

							<div class="space-6"></div>
							<p>
								请输入您的注册邮箱
							</p>
							<form id="backPasswordForm" action="${ctx}/auth/retrieve/password" method="post">
								<fieldset>
									<label class="block clearfix">
										 <div class="parentCls divElem" style="display: inline; width: 100%" >
												<span class="block input-icon input-icon-right">
											        <input type="email" style="padding-left: 6px;padding-right: 24px" class="form-control validate[required,maxSize[50]] inputElem" name="email" placeholder="邮箱">
												<i class="ace-icon fa fa-envelope"></i>
											</span>
										 </div>
									</label>

									<div class="clearfix">
										<button type="submit" class="width-35 pull-right btn btn-sm btn-primary">
											<i class="ace-icon fa fa-lightbulb-o"></i>
											<span class="bigger-110">发送!</span>
										</button>
									</div>
								</fieldset>
							</form>
						</div><!-- /.widget-main -->

						<div class="toolbar center">
							<a href="#" data-target="#login-box" class="back-to-login-link">
								登录
								<i class="ace-icon fa fa-arrow-right"></i>
							</a>
						</div>
					</div><!-- /.widget-body -->
				</div><!-- /.forgot-box -->
				</c:if>
				<c:if test="${applicationScope['sys_register_open']}">
				<div id="signup-box" class="signup-box widget-box no-border">
					<div class="widget-body">
						<div class="widget-main">
							<h4 class="header green lighter bigger">
								<i class="ace-icon fa fa-users blue"></i>
								新用户注册
							</h4>

							<div class="space-6"></div>
							<p>请填写以下资料: </p>

							<form id="registerForm" action="${ctx}/auth/register" method="post">
								<input type="hidden" valid="true" name="password">
								<fieldset>
									<label class="block clearfix">
										 <div class="parentCls divElem" style="display: inline; width: 100%" >
												<span class="block input-icon input-icon-right">
											        <input type="email" style="padding-left: 6px;padding-right: 24px" class="form-control validate[required,maxSize[50]] inputElem" name="email" placeholder="邮箱">
												<i class="ace-icon fa fa-envelope"></i>
											</span>
										 </div>
									</label>

									<label class="block clearfix">
										<span class="block input-icon input-icon-right">
											<input type="text" name="name" oldval="" class="form-control validate[required,maxSize[50]]" placeholder="用户名" />
											<i class="ace-icon fa fa-user"></i>
										</span>
									</label>

									<label class="block clearfix">
										<span class="block input-icon input-icon-right">
											<input type="password"  oldval="" class="form-control newPassword1 validate[required,maxSize[20]]" placeholder="密码" />
											<i class="ace-icon fa fa-lock"></i>
										</span>
									</label>

									<label class="block clearfix">
										<span class="block input-icon input-icon-right">
											<input type="password"  oldval="" targetname="password" class="form-control validate[required,maxSize[20],equals[.newPassword1]] password newPassword2" placeholder="再次输入密码" />
											<i class="ace-icon fa fa-retweet"></i>
										</span>
									</label>

									<label class="block">
										<input type="checkbox" class="ace" name="agree" />
										<span class="lbl">
											同意
											<a href="#" target="_blank">《用户协议》</a>
										</span>
									</label>

									<div class="space-24"></div>

									<div class="clearfix">
										<button type="reset" class="width-30 pull-left btn btn-sm">
											<i class="ace-icon fa fa-refresh"></i>
											<span class="bigger-110">重置</span>
										</button>

										<button type="submit" class="width-65 pull-right btn btn-sm btn-primary">
											<span class="bigger-110">注册</span>

											<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
										</button>
									</div>
								</fieldset>
							</form>
						</div>

						<div class="toolbar center">
							<a href="#" data-target="#login-box" class="back-to-login-link">
								<i class="ace-icon fa fa-arrow-left"></i>
								登录
							</a>
						</div>
					</div><!-- /.widget-body -->
				</div><!-- /.signup-box -->
                </c:if>
              </div><!-- /.position-relative -->
            </div>
          </div>
        </div>
      </div>
    </div>
    </center>
     <div class="footer">
	<div class="footer-inner">
		<div class="footer-content">
			<span class="bigger-120">
				Copyright &copy; ${copyright_year}
				<span class="blue bolder copyright">${copyright}</span>.
				All rights reserved. 
			</span>
		</div>
	</div>
</div>
     
 <%@ include file="/WEB-INF/views/jsp/includes/footerjs_simple.jsp" %>
<script type="text/javascript" src="${plugin}/crypt/cryptoJS/components/core.js"></script>
<script type="text/javascript" src="${plugin}/crypt/cryptoJS/components/md5.js"></script>
<script type="text/javascript" src="${plugin}/crypt/cryptoJS/rollups/aes.js"></script>
<script type="text/javascript" src="${plugin}/crypt/cryptoJS/components/pad-iso10126-min.js"></script>
 <script type="text/javascript">
    var aesKey = "${sessionScope.id}"; 
</script>
<script type="text/javascript" src="${ctx}/static/js/login.js"></script>
</body>
</html>